home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2005 October / PCWOCT05.iso / Software / FromTheMag / XAMPP 1.4.14 / xampp-win32-1.4.14-installer.exe / xampp / apache / conf / ssl.crl / Makefile next >
Makefile  |  2001-10-16  |  2KB  |  55 lines

  1. ##
  2. ##  Makefile to keep the hash symlinks in SSLCARevocationPath up to date
  3. ##  Copyright (c) 1998-2001 Ralf S. Engelschall, All Rights Reserved. 
  4. ##
  5.  
  6. SSL_PROGRAM=
  7.  
  8. update: clean
  9.     -@ssl_program="$(SSL_PROGRAM)"; \
  10.     if [ ".$$ssl_program" = . ]; then \
  11.         for dir in . `echo $$PATH | sed -e 's/:/ /g'`; do \
  12.             for program in openssl ssleay; do \
  13.                 if [ -f "$$dir/$$program" ]; then \
  14.                     if [ -x "$$dir/$$program" ]; then \
  15.                         ssl_program="$$dir/$$program"; \
  16.                         break; \
  17.                     fi; \
  18.                 fi; \
  19.             done; \
  20.             if [ ".$$ssl_program" != . ]; then \
  21.                 break; \
  22.             fi; \
  23.         done; \
  24.     fi; \
  25.     if [ ".$$ssl_program" = . ]; then \
  26.         echo "Error: neither 'openssl' nor 'ssleay' program found" 1>&2; \
  27.         exit 1; \
  28.     fi; \
  29.     for file in *.crl; do \
  30.         [ "x$$file" = "x*.crl" ] && continue; \
  31.         if [ ".`grep SKIPME $$file`" != . ]; then \
  32.             echo dummy |\
  33.             awk '{ printf("%-15s ... Skipped\n", file); }' \
  34.             "file=$$file"; \
  35.         else \
  36.             n=0; \
  37.             while [ 1 ]; do \
  38.                 hash="`$$ssl_program crl -noout -hash <$$file`"; \
  39.                 if [ -r "$$hash.r$$n" ]; then \
  40.                     n=`expr $$n + 1`; \
  41.                 else \
  42.                     echo dummy |\
  43.                     awk '{ printf("%-15s ... %s\n", file, hash); }' \
  44.                     "file=$$file" "hash=$$hash.r$$n"; \
  45.                     ln -s $$file $$hash.r$$n; \
  46.                     break; \
  47.                 fi; \
  48.             done; \
  49.         fi; \
  50.     done
  51.  
  52. clean:
  53.     -@rm -f [0-9a-fA-F]*.r[0-9]*
  54.  
  55.